#!/bin/sh

mvn clean package -Dmaven.test.skip=true

sh /opt/tomcat-lingyun/bin/shutdown.sh

datename=$(date +%Y%m%d-%H%M%S)

mv /opt/tomcat-lingyun/webapps/ROOT/  /opt/backup-lingyun/ROOT.bak.$datename

mv lingyun-cloud-web/target/ROOT /opt/tomcat-lingyun/webapps/

# cp -fr lingyun-cloud-web/src/main/profiles/prod/*  /opt/tomcat-lingyun/webapps/ROOT/WEB-INF/classes/

sh /opt/tomcat-lingyun/bin/startup.sh



exit